package com.yc.cglib;

import net.sf.cglib.core.DebuggingClassWriter;

/**
 * @author zwei
 * @create 2024-08-03 16:33
 */
public class Test {
    public static void main(String[] args) {
        System.setProperty(DebuggingClassWriter.DEBUG_LOCATION_PROPERTY, "E:\\cglib");
        OrderBizImpl orderBiz = new OrderBizImpl();     //不能面向接口 面向继承
        MyInterceptor myInterceptor = new MyInterceptor(orderBiz);
        //创建代理对象
        orderBiz = (OrderBizImpl) myInterceptor.createProxy();
        orderBiz.saveOrder(1001);
        orderBiz.showOrder();
    }
}
